﻿using System;
using System.Windows.Forms;

namespace SixthClassAssignment{
    public partial class MainWindow : Form{
        private void Login(object sender,EventArgs e){
            if ("root".Equals(username.Text) && "root".Equals(password.Text)) {
                Hide();
                var win = new FunctionWindow(username.Text);
                win.Show();
            }
            else {
                tips.Text = "用户名或密码错误请重新输入";
            }
        }
        private void AddEvent(){
            login.Click += Login;
        }
        public MainWindow(){
            InitializeComponent();
            AddEvent();
        }
    }
}